package com.yzh.blog.pojo;

import lombok.Data;

import java.util.List;

/**
 * @author yzh
 * @version 1.0
 * @description: TODO
 * @date 2022/4/14 20:56
 * id、文章标题、文章内容、文章简介、作者id、创建时间、阅读数、点赞数、收藏数
 */
@Data
public class Article {
    private String id;     //id
    private String title;
    private String summary;
    private String createDate;
    private Integer views;
    private Integer likes;
    private Integer collection;
    private String authodId;
    private String body;
    private String category;
    private Integer commentCounts;
    private String headImg;
    private List<String> tags;

    public Article() {
    }

    public Article(String title,String body) {
        this.title = title;
        this.body = body;
    }
    public Article(String id, String title, String summary, String createDate, String body, String category) {
        this.id = id;
        this.title = title;
        this.summary = summary;
        this.createDate = createDate;
        this.body = body;
        this.category = category;
    }

    public Article(String id, String title, String summary, String createDate, Integer views, Integer likes, Integer collection, String authodId, String body, String category, Integer commentCounts, String headImg, List<String> tags) {
        this.id = id;
        this.title = title;
        this.summary = summary;
        this.createDate = createDate;
        this.views = views;
        this.likes = likes;
        this.collection = collection;
        this.authodId = authodId;
        this.body = body;
        this.category = category;
        this.commentCounts = commentCounts;
        this.headImg = headImg;
        this.tags = tags;
    }
}
